import { SensitiveSwitchInfo } from 'admin/schema/SystemSet';
import $http from '../../../servers/http';
import { Result } from '../../schema/Result';

/**查询界面敏感信息配置 */
export const queryWebSensitiveSwitch = (): Promise<Result<SensitiveSwitchInfo>> => {
  return $http.get({
    url: '/icms/systemconfig/webinfodesensitization',
  });
};

/**设置界面敏感信息配置 */
export const updateWebSensitiveSwitch = (data: SensitiveSwitchInfo): Promise<Result<null>> => {
  return $http.patch({
    url: '/icms/systemconfig/webinfodesensitization',
    data,
  });
};

/**查询报表敏感信息配置 */
export const queryReportSensitiveSwitch = (): Promise<Result<SensitiveSwitchInfo>> => {
  return $http.get({
    url: '/icms/systemconfig/reportinfodesensitization',
  });
};

/**设置报表敏感信息配置 */
export const updateReportSensitiveSwitch = (data: SensitiveSwitchInfo): Promise<Result<null>> => {
  return $http.patch({
    url: '/icms/systemconfig/reportinfodesensitization',
    data,
  });
};

/** VPN心跳监听 */
export const vpnBeatCheck = (): Promise<Result<null>> => {
  return $http.post({
    url: '/sso/user/beat',
  });
};
